package zl.applet.puzzle;
import javax.swing.JButton;

//自定义按钮类
public class MyButton extends JButton
{
	private static final long serialVersionUID = 1L;
	private int row,col;    //扩展、按钮所在行、列

	//封装字段
	public void setRow(int row)
	{
		this.row = row;
	}
	public int getRow()
	{
		return this.row;
	}
	public void setCol(int col)
	{
		this.col = col;
	}
	public int getCol()
	{
		return this.col;
	}

	public MyButton(int row,int col)
	{
		//带参构造、为字段初始化
		this.row = row;
		this.col = col;
	}
}